<?php echo $this->fetch('member.header.html'); ?>
<style type="text/css">
.my_money .audit_css{width:100%; padding:10px 0;overflow:hidden}
.my_money .audit_css h3{color:#F00; font-size:22px}
.my_money .audit_css .audit_menu{width:100%;}
.my_money .audit_css .audit_menu li{float:left; padding-right:30px; font-size:13px;}
.my_money .audit_css .audit_menu li a{color:#00F;padding:5px; display:block;text-decoration:none}
.my_money .audit_css .audit_menu li a:hover{color:#F00; text-decoration:underline}
.my_money .audit_css .audit_menu li a.ck{color:#FFF; padding:5px; background:#FF4F01}
.my_money .audit_css .audit_table{margin-top:10px; border-top:2px #FF4F01 solid; background:#e1e1e1}
.my_money .audit_css .audit_table th{font-weight:bold; line-height:180%;border:1px solid #e5e5e5;border-width:1px 1px 1px 1px;text-align:center; background:#f5f5f5}
.my_money .audit_css .audit_table td{background:#FFF; padding:7px 5px;line-height:180%;border:1px solid #e5e5e5;border-width:1px 1px 1px 1px;text-align:center;}
.my_money .audit_css .audit_table strong{color:#F00}
.my_money .audit_css .audit_table a{color:#00F; text-decoration:none}
.my_money .audit_css .audit_table a:hover{color:#F00; text-decoration:underline}
</style>
<script type="text/javascript">
$(function(){
    $('#add_time_from').datepicker({dateFormat: 'yy-mm-dd',changeMonth: true, changeYear: true});
    $('#add_time_to').datepicker({dateFormat: 'yy-mm-dd',changeMonth: true, changeYear: true});
});
</script>
<div class="content_color">
<div class="content">
  <?php echo $this->fetch('member.menu.html'); ?>
  <div id="right">
      <?php echo $this->fetch('member.submenu.html'); ?>
    <div class="wrap">
          <div class="public_select table">
          <div class="my_money">
          <div class="my_monye_info">
          <dl>
            <dt>您的会员账户：<strong><?php echo htmlspecialchars($this->_var['visitor']['user_name']); ?></strong></dt><dt>可用金额为：<strong>$ <?php echo $this->_var['money_money']['money']; ?></strong> 美元</dt><dt>冻结金额为：<strong>$ <?php echo $this->_var['money_money']['money_dj']; ?></strong> 美元</dt></dl>
          <dl style="display:none"><dt>实名认证状态：<?php if ($this->_var['money_money']['rz_is_ok'] == 3): ?><strong>通过认证</strong><?php if ($this->_var['visitor']['store_id']): ?>，您可以<img src="<?php echo $this->res_base . "/" . 'images/member/remit_pay_li.png'; ?>" width="17" height="16" align="absmiddle" /><a href="index.php?app=my_money&act=encash_bank">申请提现</a><?php endif; ?><?php else: ?><strong>尚未申请</strong>，您可以<img src="<?php echo $this->res_base . "/" . 'images/member/remit_pay_li.png'; ?>" width="17" height="16" align="absmiddle" /><a href="index.php?app=member&act=certificate">申请实名认证</a><?php endif; ?></dt></dl>
          </div>          
            <div class="audit_css">
<div class="user_search">
<form method="get">
    <span>收支类型:</span>
    <select name="type" onchange="location='index.php?app=my_money&type='+this.value+'<?php if ($_GET['add_time_from']): ?>&add_time_from=<?php echo $_GET['add_time_from']; ?><?php endif; ?><?php if ($_GET['add_time_to']): ?>&add_time_to=<?php echo $_GET['add_time_to']; ?><?php endif; ?>';" class="select_class" style="height:27px;padding:3px;">
      <option value="" <?php if (! $_GET['type']): ?>selected<?php endif; ?>>全部收支</option>
      <option value="10" <?php if ($_GET['type'] == 10): ?>selected<?php endif; ?>>—订单收入</option>
      <option value="20" <?php if ($_GET['type'] == 20): ?>selected<?php endif; ?>>—订单支出</option>
      <option value="30" <?php if ($_GET['type'] == 30): ?>selected<?php endif; ?>>—网上充值</option>
      <option value="40" <?php if ($_GET['type'] == 40): ?>selected<?php endif; ?>>—银行充值</option>
      <option value="50" <?php if ($_GET['type'] == 50): ?>selected<?php endif; ?>>—帐户转入</option>
      <option value="51" <?php if ($_GET['type'] == 51): ?>selected<?php endif; ?>>—帐户支出</option>
    </select>&nbsp;&nbsp;
    <span>起止日期:</span>
    <input type="text" class="text_small" name="add_time_from" id="add_time_from" value="<?php echo $_GET['add_time_from']; ?>"/> &#8211;
    <input type="text" class="text_small" name="add_time_to" id="add_time_to" value="<?php echo $_GET['add_time_to']; ?>"/>
    <input type="hidden" name="app" value="my_money" />
    <input type="submit" class="formbtn" value="搜索" />
    <?php if ($_GET['type'] || $_GET['add_time_from']): ?>
    <input name="按钮" type="button" class="formbtn" value="取消条件" onclick="window.location.href='index.php?app=my_money'" style="color:#F00">
    <?php endif; ?>
</form>
</div>         
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="audit_table">
  <tr>
    <th>时间</th>
    <th>收入</th>
    <th>支出</th>
    <th>备注</th>
  </tr>
  <?php $_from = $this->_var['my_money']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'mymoney');if (count($_from)):
    foreach ($_from AS $this->_var['mymoney']):
?>
  <tr>
    <td><?php echo local_date("Y-m-d H:i:s",$this->_var['mymoney']['add_time']); ?></td>
    <td><strong><?php echo ($this->_var['mymoney']['money_sr'] == '') ? '-' : $this->_var['mymoney']['money_sr']; ?></strong></td>
    <td><strong><?php echo ($this->_var['mymoney']['money_zc'] == '') ? '-' : $this->_var['mymoney']['money_zc']; ?></strong></td>
    <td style="text-align:left"><?php echo $this->_var['mymoney']['log_text']; ?></td>
  </tr>
  <?php endforeach; else: ?>
  <tr>
      <td class="align2 member_no_records" colspan="4"><br />您的账户暂无收支明细<br /><br /></td>
  </tr>
  <?php endif; unset($_from); ?><?php $this->pop_vars();; ?>
</table>
<div style="margin-top:8px; overflow:hidden; width:100%">
<div class="left">
<?php if ($this->_var['money_total']['money_sr_total']): ?>收入总计：<strong style="color:#F00"><?php echo $this->_var['money_total']['money_sr_total']; ?></strong> 美元<?php endif; ?>&nbsp;&nbsp;&nbsp;&nbsp;
<?php if ($this->_var['money_total']['money_zc_total']): ?>支出总计：<strong style="color:#F00"><?php echo $this->_var['money_total']['money_zc_total']; ?></strong> 美元<?php endif; ?>
</div>
<div class="right">
<?php echo $this->fetch('member.page.bottom.html'); ?>
</div>
</div>
</div>
            </div>        
          </div>
          </div>
      </div>
      <div class="clear"></div>
  </div>
    <div class="clear"></div>
<iframe name="iframe_post" id="iframe_post" width="0" height="0"></iframe>
</div>
<?php echo $this->fetch('footer_member.html'); ?>